package com.ruoyi.business.payment.enums;


// 退款状态枚举
public enum OrderRefundStatus {
    PENDING_APPROVAL(0, "待审批"),
    IN_APPROVAL(1, "审批中"),
    APPROVED(2, "已审批"),
    REJECTED(3, "已拒绝"),
    EXECUTING(4, "执行中"),
    COMPLETED(5, "已完成"),
    FAILED(6, "已失败");

    private final int code;
    private final String description;

    OrderRefundStatus(int code, String description) {
        this.code = code;
        this.description = description;
    }

    public static String getNameByCode(Integer code) {
        for (PaymentOrderStatus enums : PaymentOrderStatus.values()) {
            if (enums.getCode()==code) {
                return enums.getDescription();
            }
        }
        return "";
    }


    public int getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }
}